package com.shiwaixiangcun.authz.service.impl;

import com.shiwaixiangcun.authz.repository.ClientDetailsChildrenRepository;
import com.shiwaixiangcun.authz.service.ClientDetailsService;
import com.shiwaixiangcun.core.domain.oauth.ClientDetails;
import com.shiwaixiangcun.core.service.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by SilentWu on 2017/2/24.
 */
@Service
public class ClientDetailsServiceImpl extends BaseServiceImpl<ClientDetailsChildrenRepository, ClientDetails, Long> implements ClientDetailsService {

    /**
     * 构造函数.
     *
     * @param repository 注入的Repository
     */
    public ClientDetailsServiceImpl(ClientDetailsChildrenRepository repository) {
        super(repository);
    }


    @Override
    public List<Map> queryClientDetailsList() {
        List<Map> mapList = repository.queryClientDetailsList();
        return mapList;
    }

    @Override
    public Map loadClientDetails(String clientId) {
        return repository.loadClientDetails(clientId);
    }
}
